import os
fs = os.listdir('.')

res = []
for f in fs:
    con = open(f, 'rb').read()
    res.append([f, len(con)])

def cmp(a, b):
    if a[1] < b[1]:
        return -1
    if a[1] > b[1]:
        return 1
    return 0

res.sort(cmp=cmp)
for k in res:
    print k

